package org.xiji.strategy;

import org.xiji.strategy.behavior.behavior.Behavior;

/**
 * 策略模式
 */
public class PeopleBehaviorStrategy {

    private Behavior behavior;

    public PeopleBehaviorStrategy(Behavior behavior) {
        this.behavior = behavior;
    }

    public PeopleBehaviorStrategy() {
    }

    public Behavior getBehavior() {
        return behavior;
    }

    public void setBehavior(Behavior behavior) {
        this.behavior = behavior;
    }

    /**
     * 调用策略的方法
     */
    public String doSomething(){
        return behavior.doSomething();
    }
}
